package lyw0720;

public class x13579 {
    public static void main(String[] args) {
    int n = 9;
    for (int i = 1; i <= n; i += 2) {
        int m = (n - i) / 2;
        for (int j = 0; j < m; j++) {
            System.out.print(" ");
        }
        for (int j = 0; j < i; j++) {
            System.out.print("*");
        }

        System.out.println();
    }

    for (int i = n - 2; i > 0; i -= 2) {
        int m = (n - i) / 2;

        for (int j = 0; j < m; j++) {
            System.out.print(" ");
        }

        for (int j = 0; j < i; j++) {
            System.out.print("*");
        }

        System.out.println();
    }
}
}
